package queue;

import java.util.*;

/**
 * @Author Jun jie Yi
 * 2022/3/17 13:49
 */
public class PriorityQueueTest {
    public static void main(String[] args) {

        Queue<Integer> queue = new PriorityQueue<>();
        queue.add(1);
        queue.add(3);
        queue.add(42);
        int len = queue.size();
        for (int i = 0; i < len; i++) {
            System.out.println(queue.poll());
        }

    }
}
